# REPLICATION FILE
  
# "Electoral cycles of protests and statistical manipulation: 
# evidence from the COVID-19 pandemic," Democratization
# Hidekuni Washida
# October 28, 2024

# Replication of Appendix C2

library("tidyverse")
library("BenfordTests")
library("benford.analysis")

#########################
# AUTOCRACY 
D1a <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==0, v2x_regime2019!=0,  since_ele_main5==1, post_coup==0, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D1$new_deaths_first_digit)
edist.benftest(D1$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D1$new_deaths_first_digit, pvalmethod = "simulate")
benford(D1$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D2a <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==0, v2x_regime2019!=0,  since_ele_main5==2, post_coup==0, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D2$new_deaths_first_digit)
edist.benftest(D2$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D2$new_deaths_first_digit, pvalmethod = "simulate")
benford(D2$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D3a <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==0, v2x_regime2019!=0,  since_ele_main5==3, post_coup==0, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D3$new_deaths_first_digit)
edist.benftest(D3$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D2$new_deaths_first_digit, pvalmethod = "simulate")
benford(D3$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D4a <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==0, v2x_regime2019!=0,  since_ele_main5==4, post_coup==0, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D4$new_deaths_first_digit)
edist.benftest(D4$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D4$new_deaths_first_digit, pvalmethod = "simulate")
benford(D4$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D5a <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==0, v2x_regime2019!=0,  since_ele_main5==5, post_coup==0, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D5$new_deaths_first_digit)
edist.benftest(D5$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D5$new_deaths_first_digit, pvalmethod = "simulate")
benford(D5$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

###########
# DEMOCRACY

D1d <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==1, v2x_regime2019!=0, post_coup==0,  since_ele_main5==1, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D1$new_deaths_first_digit)
edist.benftest(D1$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D1$new_deaths_first_digit, pvalmethod = "simulate")
benford(D1$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D2d <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==1, v2x_regime2019!=0, post_coup==0,  since_ele_main5==2, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D2$new_deaths_first_digit)
edist.benftest(D2      $new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D2$new_deaths_first_digit, pvalmethod = "simulate")
benford(D2$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D3d <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==1, v2x_regime2019!=0, post_coup==0,  since_ele_main5==3, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D3$new_deaths_first_digit)
edist.benftest(D3$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D2$new_deaths_first_digit, pvalmethod = "simulate")
benford(D3$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D4d <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==1, v2x_regime2019!=0, post_coup==0,  since_ele_main5==4, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D4$new_deaths_first_digit)
edist.benftest(D4$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D4$new_deaths_first_digit, pvalmethod = "simulate")
benford(D4$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D5d <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==1, v2x_regime2019!=0, post_coup==0,  since_ele_main5==5, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D5$new_deaths_first_digit)
edist.benftest(D5$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D5$new_deaths_first_digit, pvalmethod = "simulate")
benford(D5$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)


#################################################

# v2pssunparD 

Dh1 <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==0, v2x_regime2019!=0, post_coup==0,  since_ele_main5==1, new_deaths_first_digit>0,
         v2pssunparD == 0) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

Dh2 <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==0, v2x_regime2019!=0, post_coup==0,  since_ele_main5==2, new_deaths_first_digit>0,
         v2pssunparD == 0) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

Dh3 <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==0, v2x_regime2019!=0, post_coup==0,  since_ele_main5==3, new_deaths_first_digit>0,
         v2pssunparD == 0) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

Dh4 <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==0, v2x_regime2019!=0, post_coup==0,  since_ele_main5==4, new_deaths_first_digit>0,
         v2pssunparD == 0) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

Dh5 <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==0, v2x_regime2019!=0, post_coup==0,  since_ele_main5==5, new_deaths_first_digit>0,
         v2pssunparD == 0) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

######

Dl1 <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==0, v2x_regime2019!=0, post_coup==0,  since_ele_main5==1, new_deaths_first_digit>0,
         v2pssunparD == 1) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

Dl2 <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==0, v2x_regime2019!=0, post_coup==0,  since_ele_main5==2, new_deaths_first_digit>0,
         v2pssunparD == 1) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")

benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

Dl3 <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==0, v2x_regime2019!=0, post_coup==0,  since_ele_main5==3, new_deaths_first_digit>0,
         v2pssunparD == 1) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

Dl4 <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==0, v2x_regime2019!=0, post_coup==0,  since_ele_main5==4, new_deaths_first_digit>0,
         v2pssunparD == 1) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

Dl5 <- read_csv("weekly.csv") %>%
  filter(e_boix_regime2019==0, v2x_regime2019!=0, post_coup==0,  since_ele_main5==5, new_deaths_first_digit>0,
         v2pssunparD == 1) %>%
  select(new_deaths_first_digit, new_deaths)
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

#################################################
###Country level#################################
#################################################

D <- read_csv("weekly.csv") %>%
  filter(ccode==2, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==20, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==40, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==41, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==42, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==51, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")

benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==52, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==53, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==70, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")

benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==90, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==91, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==92, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==93, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==94, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==95, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==100, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==101, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==110, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==115, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==130, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==135, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==140, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==145, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==150, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==155, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==160, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==165, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==200, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==205, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==210, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")

benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==211, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==212, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==220, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==225, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==230, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==235, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==255, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==290, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")

benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==305, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==310, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==316, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==317, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==325, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==338, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==339, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==341, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==343, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==344, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==346, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==349, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==350, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==352, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==355, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==359, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==360, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==365, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==366, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==367, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==368, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==369, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==370, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==371, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==372, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==373, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==375, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==380, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==385, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==390, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==395, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==402, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==403, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==404, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==411, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==420, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==432, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==433, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==434, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==435, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==436, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==437, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==438, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==439, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==450, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==451, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==452, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==461, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")

benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==471, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==475, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==481, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")

benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==482, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==483, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==484, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==490, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==500, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==501, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==510, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==516, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==517, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==520, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==522, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==530, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==531, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==540, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==541, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==551, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==552, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==553, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==560, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==565, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==570, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==571, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==572, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==580, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==581, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==590, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==591, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==600, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==615, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==616, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==620, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")

benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==626, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==630, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==640, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==645, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==651, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==652, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==660, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==663, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==666, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==670, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==679, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==690, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==692, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==694, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==696, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==698, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==700, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==702, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==703, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==704, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==705, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==710, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==712, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==713, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==731, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==732, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==740, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==750, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==760, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==770, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==771, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==775, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==780, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==781, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==790, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==800, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==811, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==812, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==816, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==820, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==830, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==840, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==850, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==900, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==910, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==920, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==935, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==940, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)

D <- read_csv("weekly.csv") %>%
  filter(ccode==950, new_deaths_first_digit>0) %>%
  select(new_deaths_first_digit, new_deaths) 
chisq.benftest(D$new_deaths_first_digit)
edist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
mdist.benftest(D$new_deaths_first_digit, pvalmethod = "simulate")
benford(D$new_deaths, number.of.digits = 1, sign = "positive", discrete=TRUE, round=3)
